package com.echoesnet.echoesshortvideo.ViewModels;

import android.arch.lifecycle.LiveData;
import android.arch.lifecycle.ViewModel;

import com.echoesnet.echoesshortvideo.Beans.PublishVideoBean;
import com.echoesnet.echoesshortvideo.Repositories.PublishRepository;

/**
 * Copyright (C) 2017 在线回声（天津）科技发展有限公司
 * 在线回声完全享有此软件的著作权，违者必究
 *
 * @author an
 * @version 1.0
 * @modifier
 * @createDate 2018/4/23 0023
 * @description
 */
public class PublishVideoModel extends ViewModel
{
    private LiveData<PublishVideoBean> data;
    private PublishRepository publishRepository;

    public PublishVideoModel()
    {
        publishRepository = new PublishRepository();
    }

    public LiveData<PublishVideoBean> cutVideo(String startTime, String endTime, String path)
    {
        data = publishRepository.cutVideo(startTime, endTime, path);
        return data;
    }

    public LiveData<PublishVideoBean> getThumbnail(boolean isCamera,long startTime,String path,int degree)
    {
        data = publishRepository.getThumbnail(isCamera,startTime, path,degree);
        return data;
    }

    public LiveData<PublishVideoBean> compressVideo(String path)
    {
        data = publishRepository.compressVideo( path);
        return data;
    }
}
